@os-design/media
Utils and hooks for using CSS media queries. Can be used without os-design.
media
– Generates media queries.useIsMaxWidth
– Checks whether the width of the screen is less than or equal to the specified media breakpoint (for example, sm).useIsMinWidth
– Checks whether the width of the screen is greater than or equal to the specified media breakpoint (for example, md).useIsWidth
– Checks whether the width of the screen matches the condition defined by the specified function.
All hooks support SSR.
Installation
Install the package using the following command:
yarn add @os-design/media
See all the features in the Storybook.